/*
 * @Author: your name
 * @Date: 2021-10-22 21:08:27
 * @LastEditTime: 2021-11-16 12:55:15
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \xgy-front\src\api\dashboard\absentHistoryController.js
 */
import request from '@/request'



/**
 * 获取各个学院某日的学生情况
 * @param {*} collegeId 
 * @param {*} date 
 * @returns 
 */
///dashboard/history/college/4272/1626595300/false
export function getCountOfStudentByCollege(collegeId, date) {
  return request({
    url: `/dashboard/history/college/${collegeId}/${date}/false`,
    method: 'get',
  })

}


/**
 * 获取学校过去days天到 date日的学生情况列表
 * @param {*} date 
 * @param {*} days 
 * @returns 
 */
export function getCountOfStudentByUniversity(date, days) {
  return request({
    url: `/dashboard/history/university/${date}/${days}/false`,
    method: 'get',
  })

}





export function getAllStudentInSchool(day) {
  return request({
    url: `dashboard/history/segmentation/safe/${day}/false`,
    method: 'get'
  })
}

/**
 * 
 * 获取过去N天到现在的学生情况总数
 * @param {*} start 
 * @param {*} end 
 * @param {*} option 
 * @returns 
 */
export function getCountofStudentNotInSchoolByDay(start, end, option) {
  return request({
    url: `/dashboard/history/segmentation/${start}/${end}/${option}`,
    method: 'get'
  })
}


/**
 * 获取过去23天到现在的学生情况
 * @param {*} day 
 * @param {*} option 
 * @returns 
 */
export function getSegmentationList(day, option) {
  return request({
    url: `/dashboard/history/segmentationList/${day}/${day + 23}/${option}`,
    method: 'get'
  })
}

/**
 * 按年级查询人数
 * @param {*} grade 
 * @param {*} date 
 * @param {*} option 
 * @returns 
 */
export function getStudentInSchoolByGrade(grade, date, option) {
  return request({
    url: `dashboard/history/grade/${grade}/${date}/${option}`,
    method: 'get'
  })
}